package com.jy.wms.dao;

import com.jy.wms.common.base.BaseDao;
import com.jy.wms.pojo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName: WmsLoadingMapper.java
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @Author Yjs
 * @Date Wed Jan 31 16:01:23 GMT+08:00 2018
 */
public interface WmsLoadingMapper extends BaseDao<WmsLoading> {
    /**
     * 分页查询出库发运信息
     *
     * @param entity
     * @param fyztList
     * @param jhztList
     * @return
     */
    public List<WmsShipmentOrder> baseSelectPage(@Param("WmsShipmentOrder") WmsShipmentOrder entity, @Param("fyztList") List<String> fyztList, @Param("jhztList") List<String> jhztList);

    /**
     * 查询货主信息
     *
     * @param hzid
     * @param ckid
     * @return
     */
    public WmsOwner searchHz(@Param("hzid") String hzid, @Param("ckid") String ckid);

    /**
     * 查询发运订单信息
     * @param id
     * @return
     */
    WmsShipmentOrder searchFydd(@Param("id") String id);
    /**
     * 查询协助订单信息
     * @param id
     * @return
     */
    WmsAssistDelivery searchAssist(@Param("id") String id);

    /**
     * 创建装车单信息
     *
     * @param entity
     * @return int
     */
    public Integer addLoading(@Param("WmsLoading") WmsLoading entity);

    /**
     * 更改装车单号
     * @param list
     * @param zcdbh
     * @return
     */
    public Integer updateZcdbh(@Param("list") List<WmsLoadingDetailed> list, @Param("zcdbh") String zcdbh);
    /**
     * 更改装车单号
     * @param list
     * @param zcdbh
     * @return
     */
    public Integer assistUpdateZcdbh(@Param("list") List<WmsLoadingDetailed> list, @Param("zcdbh") String zcdbh);
    /**
     * 模糊查询装车单编号
     *
     * @param zcdbhTime
     * @return
     */
    public String searchZcdbh(@Param("zcdbhTime") String zcdbhTime);

    /**
     * 承运人模糊查询
     *
     * @param cyrmc
     * @return
     */
    public List<WmsLoading> searchCyr(@Param("cyrmc") String cyrmc, @Param("hzid") String hzid, @Param("ckid") String ckid);

    /**
     * 承运车模糊查询
     *
     * @param cyrid
     * @return
     */
    public List<WmsLoading> searchCph(@Param("cph") String cph, @Param("cyrid") String cyrid, @Param("hzid") String hzid, @Param("ckid") String ckid);

    /**
     * 查询发运订单数据
     *
     * @param id
     * @return
     */
    public WmsShipmentOrder searchDd(@Param("id") String id);

    /**
     * 查询发运明细订单数据
     *
     * @param fyid
     * @return
     */
    public List<WmsShipmentOrderDetailed> searchDdMx(@Param("fyid") String fyid);

    /**
     * 修改发运订单明细借货抵扣状态状态
     *
     * @param id
     * @param jhdkzt
     * @return
     */
    public int updateJhdkzt(@Param("id") String id, @Param("jhdkzt") String jhdkzt);

    /**
     * 修改发运订单借货抵扣状态状态
     *
     * @param id
     * @param jhdkzt2
     * @return
     */
    public int updateJhdkzt2(@Param("id") String id, @Param("jhdkzt") String jhdkzt2);

    /**
     * 统计箱编号数
     * @param zcdbh
     * @param list
     * @return
     */
    public List<WmsLoading> countSl(@Param("zcdbh") String zcdbh, @Param("list") List<String> list);

    /**
     * 协助统计箱编号数
     *
     * @param zcdbh
     * @param list
     * @return
     */
    public List<WmsLoading> assistCountSl(@Param("zcdbh") String zcdbh, @Param("list") List<String> list);
    /**
     * 统计总单数
     * @param zcdbh
     * @param list
     * @return
     */
    public List<WmsLoading> countSl2(@Param("zcdbh") String zcdbh, @Param("list") List<String> list);

    /**
     * 协助统计总单数
     *
     * @param zcdbh
     * @param list
     * @return
     */
    public List<WmsLoading> assistCountSl2(@Param("zcdbh") String zcdbh, @Param("list") List<String> list);
    /**
     * 查询装车单明细
     * @param zcdbh
     * @param list
     * @return
     */
    public List<WmsLoadingDetailed> searchMx(@Param("zcdbh") String zcdbh, @Param("list") List<String> list);

    /**
     * 协助查询装车单明细
     *
     * @param zcdbh
     * @param list
     * @return
     */
    public List<WmsLoadingDetailed> assistSearchMx(@Param("zcdbh") String zcdbh, @Param("list") List<String> list);
}
